﻿<%@ Page Language="C#" EnableEventValidation="false"  AutoEventWireup="true" CodeFile="wasteBook.aspx.cs" Inherits="Finance_wasteBook" %>
<%@ Register Src="../usercontrol/PageUrlGridView.ascx" TagName="PageUrlGridView" TagPrefix="uc1" %>
<html>
<head id="Head1" runat="server">
<title>财务管理 >> 销售统计</title>
<link href="../css/adminCss.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../js/changerows.js"></script>
<script type="text/javascript" src="../js/rl.js"></script>
<script type="text/javascript">
function CheckAll(form){
    for (var i=0;i<form.elements.length;i++) {
	    var e = form.elements[i];
	    if (e.name != 'chkall' && e.type=='checkbox')
		    e.checked = form.chkall.checked;
    }
}
</script>
<link href="../js/loading.css" rel="stylesheet" type="text/css" />
</head>
<script type="text/javascript" src="../js/loading.js" charset="gb2312"></script>
<body>
    <form id="form1" runat="server">
        <table width="99%" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td width="2%" height="22"><img src="../images/module.gif" width="20" height="22"/></td>
                <td align="left" ><asp:Label ID="lblPath" runat="server"></asp:Label></td>
                <td  height="22" width="10%" align="right"><a href="javascript:location.href=document.referrer;" ><img src="../images/history.gif" border="0" /></a></td>
              
            </tr>
        </table>
        <table width="99%" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td bgcolor="#3CB6E5" height="5px"></td>
          </tr>
        </table>
        <table width="99%" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td height="22" align="right"><img src="../images/search.gif" alt="搜索" width="16" height="16" />
                    查询日期：<asp:TextBox ID="txtKdate" runat="server" CssClass="input1" Width="70" MaxLength="10" onclick="SelectDate(this.name)"></asp:TextBox>至<asp:TextBox ID="txtJdate" runat="server" CssClass="input1" Width="70" MaxLength="10" onclick="SelectDate(this.name)"></asp:TextBox>
                    凭证号码：<asp:TextBox ID="financeCode" runat="server" CssClass="input1" Width="60"></asp:TextBox>人员：<asp:TextBox ID="UserName" runat="server" CssClass="input1" Width="60"></asp:TextBox>
                        部门：<asp:DropDownList ID="departmentId" runat="server">
                        </asp:DropDownList>
                财务分类：<asp:DropDownList ID="financeType" runat="server">
                            <asp:ListItem Value="">全部</asp:ListItem>
                            <asp:ListItem Value="＋">收入</asp:ListItem>
                            <asp:ListItem Value="－">支出</asp:ListItem>
                        </asp:DropDownList>
            <asp:Button ID="btnSearch" runat="server" Text="搜 索" CssClass="submit" OnClick="btnSearch_Click" />
                <asp:Button ID="Excel" runat="server" Text="导出" CssClass="inputExcel"  OnClick="Excel_Click"   /></td>
          </tr>
        </table>
        <table width="99%" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td bgcolor="#3CB6E5" height="5px">
                </td>
            </tr>
        </table>
        <asp:GridView ID="GvData" runat="server" Width="99%" AutoGenerateColumns="False" CssClass="gridview" EmptyDataText="没有数据" OnRowDataBound="GvData_RowDataBound">
             <RowStyle Height="25px" />
            <PagerSettings Visible="False" />
            <Columns>
                <asp:BoundField HeaderText="流水号" DataField="wasteBookId" />
                <asp:BoundField HeaderText="部门" DataField="departmentName" />
                <asp:BoundField HeaderText="人员" DataField="userName" />
                <asp:BoundField HeaderText="财务分类" DataField="financeType" />
                <asp:BoundField HeaderText="发生金额" DataField="financeMoney" />
                <asp:BoundField HeaderText="凭证号码" DataField="financeCode" />
                <asp:BoundField HeaderText="支付方式" DataField="PaymentMethods" />
                <asp:BoundField HeaderText="费用说明" DataField="Remark"/>
                <asp:BoundField HeaderText="审核状态" DataField="AuditState" ItemStyle-CssClass="F_red"/>
                <asp:BoundField HeaderText="操作人" DataField="EditUserName" />
                <asp:TemplateField HeaderText="操作时间">
                    <ItemTemplate>
                        <asp:Label ID="Label2" runat="server" Text='<%# Bind("EditDate","{0:d}") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="操作">
                    <ItemTemplate>
                        <asp:LinkButton ID="lnkbtnEdit" CommandArgument='<%#Eval("wasteBookId") %>' runat="server" OnClick="linkbtnUpdate_Click">修改</asp:LinkButton><asp:LinkButton ID="lnkbtnFlag" CommandArgument='<%#Eval("wasteBookId") %>' runat="server" OnClick="lnkbtnFlag_Click">审核</asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="选择">
                        <ItemTemplate>
                            <asp:CheckBox ID="ckFlag" runat="server"  />
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" />
                </asp:TemplateField>
            </Columns>
            <RowStyle HorizontalAlign="Center" />
            <EmptyDataRowStyle ForeColor="Red" HorizontalAlign="Center" />
        </asp:GridView>
        <table width="99%" border="0">
        <tr>
            <td ><uc1:PageUrlGridView ID="PageNavigator1" runat="server" DataId="GvData" ConnectionString="connstr" ShowType="Text" PageSize="20" /></td>
            <td  class="nobr">收入：<asp:Label ID="countMoneyIn" runat="server" CssClass="F_red"></asp:Label>元，支出：<asp:Label ID="countMoneyOut" runat="server" CssClass="F_red"></asp:Label>元，余额：<asp:Label
                ID="countMoney" runat="server" CssClass="F_red"></asp:Label>元</td>
            <td align="right" ><input type="checkbox" name="chkall"  onclick="CheckAll(this.form)" value="on"/><font color="#FF0000">全选</font>
            <asp:Button ID="btnAdd" runat="server" Text="添加" CssClass="submit" CausesValidation="False" OnClick="btnAdd_Click"   />&nbsp;<asp:Button  ID="btnallflag" OnClick="btnallflag_Click" runat="server" Text="批审"  CssClass="submit" OnClientClick="return confirm('确定要审核吗?')"  />&nbsp;<asp:Button  ID="btndel" runat="server" Text="删除" OnClientClick="return confirm('确定要删除吗?')" CssClass="submit"  OnClick="btndel_Click" /></td>
        </tr>
        </table>
        <asp:HiddenField ID="hfxs" runat="server" />
        <asp:HiddenField ID="HidWareid" runat="server" />
    </form>
</body>
</html>
<script language="javascript"><!--
//senfe("表格名称","奇数行背景","偶数行背景","鼠标经过背景","点击后背景");
 senfe("GvData","#ECF9FC","#FFFFFF","#D6F1F8");
--></script>